• File: web-connect-mysql.php
  • Full Path: C:/htdocs/reeft_gps_test/css/include/web-connect-mysql.php
  • Date Modified: 04/30/2025 7:56 AM
  • File size: 1.48 KB
  • MIME-type: text/x-php
  • Charset: utf-8
<?php
//======================================================================================
// Function: Connect to MySQL DB
//======================================================================================


$database_number = 1;


// Set MySQL login data (local)
if ($database_number == 1 ) {
	
	$mysql_host_name = "127.0.0.1";
	$host               = $mysql_host_name;
	$mysql_user         = "admin";
	$mysql_password     = "costello";
	$port               = "3306";
	$sys_dbname         = "reeft_db";

}

// Web hotel - agnethe.dk
if ($database_number == 2 ) {

	$mysql_host_name = "mysql65.unoeuro.com";
	$host               = $mysql_host_name;
	$mysql_user         = "agnethe_dk";
	$mysql_password     = "196x25w755";
	$port               = "3306";
	$sys_dbname         = "agnethe_dk_db";

}

// Web hotel - flexware.dk
if ($database_number == 3 ) {
	$mysql_host_name = "mysql53.unoeuro.com";
	$host               = $mysql_host_name;
	$mysql_user         = "flexware_dk";
	$mysql_password     = "42kg5thc";
	$port               = "3306";
	$sys_dbname         = "flexware_dk_db_reeftlis";
}

// Connect to DB
try{
    $conn = new mysqli($host,$mysql_user, $mysql_password, $sys_dbname);
    //$conn->set_charset("utf8");
	$conn->set_charset('utf8mb4');
    if(!$conn){
        die('Could not connect to server: ' . $mysqli->connect_error);
    }
}
catch(Exception $e){
    error_log("Could not connect to server: " . $e->getMessage());
}

?>